#include "const.h"

const char *v_get_array(var_t v, size_t i) {
	if (!(v = v_findarray(v)))
		return "";

	if (i >= v->array.n)
		return "";

	if (!v->array.members)
		return "";

	if (!v->array.members[i])
		v->array.members[i] = i_strdup("");

	return v->array.members[i];
}
